package ru.ifmo.ipimenov.ewf_svn.standalone.model;

import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;
import ru.ifmo.ipimenov.ewf_svn.standalone.dao.CategoryDao;
import ru.ifmo.ipimenov.ewf_svn.standalone.dao.StateDao;
import ru.ifmo.ipimenov.ewf_svn.standalone.dao.impl.CategoryDaoHibernate;
import ru.ifmo.ipimenov.ewf_svn.standalone.dao.impl.StateDaoHibernate;
import ru.ifmo.ipimenov.ewf_svn.standalone.model.db.Category;
import ru.ifmo.ipimenov.ewf_svn.standalone.model.db.State;

import java.util.List;

/**
 * @author: Ilya Pimenov
 * Scartel Starlab company
 */
public class StateProvider {
    /**
     * Logger for all purposes
     */
    private static Log log = LogFactory.getLog(CategoryProvider.class);

    private static StateProvider instance = new StateProvider();

    private StateDao dao = new StateDaoHibernate();

    public static StateProvider getInstance(){
        return instance;
    }

    public List<State> load(Category category){
        return dao.list(category);
    }

}